/**
 * Copyright (C) 2020 Baidu, Inc. All Rights Reserved.
 */
package com.baidu.mpks.dal.domain;

import com.fasterxml.jackson.annotation.JsonFormat;
import com.fasterxml.jackson.annotation.JsonProperty;
import com.fasterxml.jackson.databind.JsonNode;
import lombok.Data;

import java.util.Date;
import java.util.List;

/**
 * @author cuixuefei
 *
 */
@Data
public class SchemaProperty extends Schema {
    
    private Integer id;
    
    @JsonProperty("@id")
    private String atId;
    
    @JsonProperty("@type")
    private String atType;
    private JsonNode comment;
    private JsonNode label;
    private String domain;
    private String[] range;
    private String[] alias;
    private String constraint;
    private String rule;
    
    @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss", timezone = "GMT+8")
    private Date updateTime;
    
    private String updateBy;
    private String extend;
    private Integer edit;
    private Integer index;
    private Integer weight;
    private String analysis;
    private Integer indexEdit;
    @JsonProperty("enum")
    private List<String> enumValues;
    
    // 属性类型 relation关系/prop属性/propofprop属性的属性/struct嵌套结构属性
    private String dataType;

    // 属性默认值
    private String defaultValue;

    // 属性的属性(本身是数组类型数据)
    private List<String> properties;
}
